const superagent = require('superagent')
    , get_access_token = require('./get_access_token')()

async function start() {
    const token = await get_access_token
    , url = `https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=${token}`
    , content = 'hello'
    , maxim = {
        filter: {is_to_all : true},
        text: {content : content},
        msgtype: "text",
        clientmsgid: Date.now()
    }
    , res = await superagent.post(url).send(JSON.stringify(maxim))
    console.log(res.text)
}

start()
